package Thread;

import java.util.concurrent.BlockingDeque;
import java.util.concurrent.LinkedBlockingDeque;

public class ThreadDemo21 {

    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingDeque<Integer> blockingDeque = new LinkedBlockingDeque<>();

        blockingDeque.put(1);
        Integer i1 = blockingDeque.take();
        System.out.println(i1);

        Integer i2 = blockingDeque.take();
        System.out.println(i2);

    }
}
